{* Smarty *}
{literal}
<script language="JavaScript" src="/includes/java/CalendarPopup.js"></script>
<script language="JavaScript">
  var cal1 = new CalendarPopup();
  cal1.setReturnFunction("setMultipleValues3");
  function setMultipleValues3(y,m,d) {
    document.addarticle.elements["sdate[Y]"].value=y;
    document.addarticle.elements["sdate[m]"].value=m;
    document.addarticle.elements["sdate[d]"].value=d;
  }
</script>
{/literal}

<div class="box">
  <table cellspacing="0">
    <caption>{if isset($modify)}{t}modify article{/t}{else}{t}add article{/t}{/if}</caption>
    <tr>
      <th colspan="2">{if isset($modify)}{t}modify{/t}{else}{t}add{/t}{/if}</th>
    </tr>
    <tr>
      {if isset($result)}
        {if $result}
      <td class="success"><a class="success" {if isset($modify)}href="/{$module}{$new_url}">{t}article modified{/t}{else} href="{$smarty.server.PHP_SELF}">{t}article added{/t}{/if}</a></td>
        {else}
      <td>{#conf_error#}</td>
        {/if}
      {else}
      <td class="form">
        <form {$form_data.attributes}>
          <table class="form">
            <tr>
              <td class="form">{$form_data.sections.label}</td><td class="form">{$form_data.sections.html}{$section}</td>
            </tr>
            <tr>
              <td class="form">{$form_data.title.label}</td><td class="form">{$form_data.title.html}</td>
            </tr>
            <tr>
              <td class="form" valign="top">{$form_data.body.label}</td><td class="form">{$form_data.body.html}</td>
            </tr>
            <tr>
              <td class="form" colspan="2">{$form_data.ihome.label} {$form_data.ihome.html}</td>
            </tr>
            <tr>
              <td class="form" colspan="2">{$form_data.acomm.label} {$form_data.acomm.html}</td>
            </tr>
            <tr>
              <td class="form" colspan="2">{$form_data.schedule.label} {$form_data.schedule.html}</td>
            </tr>
            <tr>
              <td class="form" colspan="2">{$form_data.sdate.label} {$form_data.sdate.html}
              <a href="#" onClick="cal1.showCalendar('anchor1'); return false;" TITLE="cal1.showCalendar('anchor1'); return false;" NAME="anchor1" ID="anchor1"><img src="/themes/{$template}/images/calendar.png" border="0" align="absmiddle"></a>
              </td>
            </tr>
            <tr>
              <td colspan="2" class="center">{$form_data.btn_Submit.label}{$form_data.btn_Submit.html}</td>
            </tr>
            <tr>
              <td colspan="2" class="center">{$form_data.requirednote}</td>
            </tr>
          </table>
        </form>
      </td>
      {/if}
    </tr>
  </table>
</div>